a478ad6b07c23d11719b013afec95974d5313a3a,src/main/java/com/jkoolcloud/tnt4j/format/JSONFormatter.java,JSONFormatter,format,#Snapshot#,395
Before Change
Source source = snap.getSource();
if (source != null) {
jsonString.append(JSON_SOURCE_LABEL).append(ATTR_SEP).append(Utils.quote(source.getName())).append(ATTR_JSON);
String ssn = source.getSourceFactory().getSSN();
if (!Utils.isEmpty(ssn)) {
String escaped = StringEscapeUtils.escapeJson(ssn); // escape double quote chars
jsonString.append(JSON_SOURCE_SSN_LABEL).append(ATTR_SEP).append(Utils.quote(escaped)).append(ATTR_JSON);
}
jsonString.append(JSON_SOURCE_FQN_LABEL).append(ATTR_SEP).append(Utils.quote(source.getFQName())).append(ATTR_JSON);
if (!Utils.isEmpty(source.getUrl())) {
String escaped = StringEscapeUtils.escapeJson(source.getUrl()); // escape double quote chars
jsonString.append(JSON_SOURCE_URL_LABEL).append(ATTR_SEP).append(Utils.quote(escaped)).append(ATTR_JSON);
After Change
Source source = snap.getSource();
if (source != null) {
jsonString.append(JSON_SOURCE_LABEL).append(ATTR_SEP).append(Utils.quote(StringEscapeUtils.escapeJson(source.getName()))).append(ATTR_JSON);
String ssn = source.getSourceFactory().getSSN();
if (!Utils.isEmpty(ssn)) {
String escaped = StringEscapeUtils.escapeJson(ssn); // escape double quote chars
jsonString.append(JSON_SOURCE_SSN_LABEL).append(ATTR_SEP).append(Utils.quote(escaped)).append(ATTR_JSON);
}
jsonString.append(JSON_SOURCE_FQN_LABEL).append(ATTR_SEP).append(Utils.quote(StringEscapeUtils.escapeJson(source.getFQName()))).append(ATTR_JSON);
if (!Utils.isEmpty(source.getUrl())) {
String escaped = StringEscapeUtils.escapeJson(source.getUrl()); // escape double quote chars
jsonString.append(JSON_SOURCE_URL_LABEL).append(ATTR_SEP).append(Utils.quote(escaped)).append(ATTR_JSON);